<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>


<%@ include file="head.jsp"%>

<style>
	.text-danger {
		margin-top: 5px;
	}
</style>

<script>
	//检查用户名是否重复的url
	var checkUserNameUrl = "${baseurl}/admin/user/checkusername";
</script>
<!-- 导入了user_add.js -->
<script src="${baseurl}/resources/admin/js/user_add.js"></script>

<div class="row">
	<ol class="breadcrumb">
		<li><a href="${baseurl }/admin">首页</a></li>
		<li class=""><a href="${baseurl }/admin/user/list/1">管理员列表</a></li>
		<li class="active">管理员新增</li>
	</ol>
</div>

<div class="row">
	<form action="${baseurl }/admin/user/add"  class="col-md-6" method="post" enctype="multipart/form-data">
		<div class="form-group">
			<label for="username">用户名</label> <input
				type="text" class="form-control" id="username" name="username"
				placeholder="请输入用户名" >
				<p class="text-danger"></p>
		</div>
		<div class="form-group">
			<label for="pw1">密码</label> <input
				type="password" class="form-control" id="pw1" name="password"
				placeholder="请输入密码">
				<p class="text-danger"></p>
		</div>
				<div class="form-group">
			<label for="pw2">确认密码</label> <input
				type="password" class="form-control" id="pw2" name="confirm_password"
				placeholder="请确认密码">
				<p class="text-danger"></p>
		</div>
		
		<div class="form-group">
			<label for="head_portrait">头像</label> <input type="file" name="image" accept="image/*"
				id="head_portrait" >
			<p class="text-danger"></p>
			<!-- 图片与预览的div -->
			<div id="showimage"></div>
		</div>
		
		<button type="submit" class="btn btn-success" id="adduser">提交</button>
		<button type="reset" class="btn btn-primary" >重置</button>
		<button type="button" class="btn btn-warning returnPage">返回</button>
	</form>
</div>


<%@ include file="footer.jsp"%>

